package ae.pcfc.etks.online.itworx.ehs.web.enums;

import java.util.HashMap;
import java.util.Map;

public enum WorkflowDataFields {

	tradeLicenseNo("tradeLicenseNo"), activity("activity"), location("location"), bcc(
			"bcc"), requestBy("requestBy"), optionalMail("optionalMail"), creationDate(
			"creationDate"), contactPersonName("contactPersonName"), mobile("mobile"), fax("fax")
			, telephone("telephone"), mainMail("mainMail"), imsLogID("imsLogID"), amendmentType("amendmentType")
			, status("status"), imsStatus("imsStatus"), customerUserID("customerUserID"), officerID("officerID")
			, remark("remark"), requestID("requestID"), requestType("requestType"), fees("fees"), englishActivity("englishActivity"), arabicActivity("arabicActivity")
			, additionalFees("additionalFees"), paymentAdvice("paymentAdvice"), additionalPaymentAdvice("additionalPaymentAdvice"), companyName("companyName"), alternativeMail("alternativeMail"), ProcessName("EHS Online Services\\OFC");

	private static Map<String, WorkflowDataFields> propertyMap = new HashMap<String, WorkflowDataFields>();

	static {
		propertyMap.put(tradeLicenseNo.getPropertyName(), tradeLicenseNo);
		propertyMap.put(activity.getPropertyName(), activity);
		propertyMap.put(location.getPropertyName(), location);
		propertyMap.put(bcc.getPropertyName(), bcc);
		propertyMap.put(requestBy.getPropertyName(), requestBy);
		propertyMap.put(optionalMail.getPropertyName(), optionalMail);
		propertyMap.put(creationDate.getPropertyName(), creationDate);
		propertyMap.put(contactPersonName.getPropertyName(), contactPersonName);
		propertyMap.put(mobile.getPropertyName(), mobile);
		propertyMap.put(fax.getPropertyName(), fax);
		propertyMap.put(telephone.getPropertyName(), telephone);
		propertyMap.put(mainMail.getPropertyName(), mainMail);
		propertyMap.put(imsLogID.getPropertyName(), imsLogID);
		propertyMap.put(amendmentType.getPropertyName(), amendmentType);
		propertyMap.put(status.getPropertyName(), status);
		propertyMap.put(imsStatus.getPropertyName(), imsStatus);
		propertyMap.put(customerUserID.getPropertyName(), customerUserID);
		propertyMap.put(officerID.getPropertyName(), officerID);
		propertyMap.put(remark.getPropertyName(), remark);
		propertyMap.put(requestID.getPropertyName(), requestID);
		propertyMap.put(requestType.getPropertyName(), requestType);
		propertyMap.put(fees.getPropertyName(), fees);
		propertyMap.put(additionalFees.getPropertyName(), additionalFees);
		propertyMap.put(paymentAdvice.getPropertyName(), paymentAdvice);
		propertyMap.put(additionalPaymentAdvice.getPropertyName(), additionalPaymentAdvice);
		propertyMap.put(companyName.getPropertyName(), companyName);
		propertyMap.put(alternativeMail.getPropertyName(), alternativeMail);
		propertyMap.put(englishActivity.getPropertyName(), englishActivity);
		propertyMap.put(arabicActivity.getPropertyName(), arabicActivity);
		propertyMap.put(ProcessName.getPropertyName(), ProcessName);
	}

	private String propertyName;

	WorkflowDataFields(String propertyName) {
		this.propertyName = propertyName;
	}

	public String getPropertyName() {
		return propertyName;
	}

	public WorkflowDataFields getFromPropertyName(String propertyName) {
		if (propertyMap.containsKey(propertyName)) {
			return propertyMap.get(propertyName);
		} else {
			return null;
		}
	}

}
